import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_fresh_mall_app/common/global/counter.dart';
import 'package:flutter_fresh_mall_app/common/global/routers.dart';
import 'package:provider/provider.dart';

class CategoryPage extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: Center(child: RaisedButton(
        child: Text('分类'+context.watch<Counter>().count.toString()),
        onPressed: (){
          context.read<Counter>().increate();
          Navigator.of(context).pushNamed(Routers.homePage);
        },
      ),),
    );
  }
}